package test;

import java.util.ArrayList;

public class Introspection {
	
	private class MyClassLoader extends ClassLoader{
		public Package[] lespacks; 
		public Package[] getpp(){
				return this.getPackages(); 
		}
		public MyClassLoader(){
				super();
				lespacks=getpp();
		}
		public  MyClassLoader getMCL(){
				return new MyClassLoader();
		}
	
	
	public Package[] mespacks(){
			
			return this.lespacks; 
			
			
	}
	}
	public MyClassLoader titi=new MyClassLoader();
	public int zero=0; 
	
	public static void main(String[] args) {
		Introspection dummy=new Introspection(); 
		ClassLoader mcl=dummy.getClass().getClassLoader();
		Package toto=dummy.getClass().getPackage(); 
		System.out.println(toto);
		System.out.println("*** "+dummy.titi.mespacks().length); 
		int i=0;
		for(Package pa:dummy.titi.mespacks())
			System.out.println((i)+" "+dummy.titi.mespacks()[i++]); 
		
	}
}
